package org.codefinger.dao;

import java.util.Map;

import org.codefinger.dao.impl.Querier;
import org.codefinger.dao.impl.QueryParam;

public class QueryChain extends AbstractQuery {

	public QueryChain(Querier querier) {
		super(new QueryParam(), querier);
	}

	public QueryChain putParam(String name, Object value) {
		param.setNamedParam(name, value);
		return this;
	}
	
	public QueryChain putParams(Map<String,Object> params) {
		param.setNamedParams(params);
		return this;
	}

	public QueryChain setParams(Object... params) {
		param.setIndexParam(params);
		return this;
	}

	public QueryChain setOrders(int... orders) {
		param.setOrders(orders);
		return this;
	}

	public QueryChain setPage(int pageIndex, int pageSize) {
		param.setPage(pageIndex, pageSize);
		return this;
	}

}
